package org.mine.design.factory.controller;

import org.mine.design.factory.enums.DemoFactoryEnum;
import org.mine.design.factory.service.factory.DemoFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController()
public class FactoryController {

    @Autowired
    private DemoFactory demoFactory;

    @RequestMapping("/factory/test")
    public void test(@RequestParam DemoFactoryEnum param) {
        demoFactory.get(param).fun();
    }
}
